home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #15
/
Monster Media Number 15 (Monster Media)(July 1996).ISO
/
tbbs
/
prgsourc.zip
/
HOMES.ZIP
/
LIST.PRG
< prev
next >
Wrap
Text File
|
1996-01-13
|
14KB
|
396 lines
PROCEDURE list
SELECT a
SET ORDER TO 1
DO cls WITH 2,0,20,79
SET COLOR TO R/R
@ 0,0 CLEAR TO 1,60
SET COLOR TO GR+/R
@ 0,3 SAY city
@ 0,Col()+1 SAY "Real Estate Listings in Area"
@ 0,Col()+1 SAY larea
SET COLOR TO W+/R
@ 0,73 SAY "LIST "
DO tl
PRIVATE crow
PRIVATE page
crow=3 && current row=top row
crec=1 && current record
SEEK larea && Search for listings
IF .NOT. Found()
SET COLOR TO W+/N
@ crow,5 SAY "No Listings in this area. to return to area list."
SET COLOR TO GR+/N
@ crow,31 SAY "<Escape>"
charin=" "
SET COLOR TO N/N
@ 2,0 GET charin
DO WHILE .T.
READ
IF LastKey() = 27
RETURN
ENDIF
ENDDO
ENDIF
more=.T.
less=.F.
brow=1
brec=0
DO nlist WITH brow,more,brec
page = brec
SEEK larea && Go to top index record
crow = 3 && current row=top row
@ crow,9 SAY " $"
@ crow,11 SAY price PICTURE "@B 9,999,999"
charin=" "
SET COLOR TO N/N
@ 2,0 GET charin
DO WHILE .NOT. EoF()
READ
DO CASE
CASE LastKey() = 5 && <Up Arrow>
IF crow = 3 && Already at top row?
IF less && Back pages?
SKIP -page && Move pointer to top
more=.T. && There are now more pages
SKIP -1 && Just to test...
IF BoF() .OR. area # larea
less = .F.
IF area # larea
SKIP
ENDIF
ELSE
SKIP
ENDIF
DO cls WITH 2,0,20,79
DO nlist WITH brow,more,brec
crec=brec
crow=brow
@ crow,9 SAY " $"
@ crow,11 SAY price PICTURE "@B 9,999,999"
ENDIF
LOOP
ENDIF
SET COLOR TO W+/N
@ crow,9 SAY " $"
@ crow,11 SAY price PICTURE "@B 9,999,999"
crow=crow-1
SKIP -1
crec=crec-1
SET COLOR TO GR+/B
@ crow,9 SAY " $"
@ crow,11 SAY price PICTURE "@B 9,999,999"
LOOP
CASE LastKey() = 13 && <Enter>
temp = crow
DO tt
DO vscr
DO view
SET COLOR TO N/N
@ 2,0 GET charin
DO WHILE Lastkey() # 27 && <Esc>
READ
IF LastKey() = 84 .OR. LastKey() = 116 && 'T' or 't'
DO tag WITH tg
ENDIF
ENDDO
SET COLOR TO R/R
@ 0,0 CLEAR TO 1,60
SET COLOR TO GR+/R
@ 0,3 SAY city
@ 0,Col()+1 SAY "Real Estate Listings in Area"
@ 0,Col()+1 SAY larea
SET COLOR TO W+/R
@ 0,73 SAY "LIST "
DO reset
RELEASE temp
LOOP
CASE LastKey() = 24 && <Dn Arrow>
IF crow = brow && Already at last row?
IF more && More pages?
SKIP && Top of new page
crec=1
less=.T. && There are now back pages
DO cls WITH 2,0,20,79
DO nlist WITH brow,more,brec
SKIP -(brec-1)
crow = 3
@ crow,9 SAY " $"
@ crow,11 SAY price PICTURE "@B 9,999,999"
ENDIF
LOOP
ENDIF
SET COLOR TO W+/N
@ crow,9 SAY " $"
@ crow,11 SAY price PICTURE "@B 9,999,999"
crow=crow+1
SKIP
crec=crec+1
SET COLOR TO GR+/B
@ crow,9 SAY " $"
@ crow,11 SAY price PICTURE "@B 9,999,999"
LOOP
CASE LastKey() = 27 && <Esc>
EXIT
CASE LastKey() = 63 && `?': Help
temp = crow
ptemp = pic1
DO cls WITH 2,0,20,79
SET COLOR TO GR+/N
@ 3,3 SAY "<Enter>"
@ 6,3 SAY "T"
@ 10,3 SAY "S"
@ 14,3 SAY "V"
SET COLOR TO BG/N
@ 3,11 SAY "View highlited listing"
@ 6,5 SAY "Tag/Untag for download/view"
@ 10,5 SAY "Search, this area only"
@ 14,5 SAY "View tagged listings"
SET COLOR TO W+/N
@ 4,3 SAY "Shows the complete listing information available for the highlited home."
@ 7,3 SAY "Marks the listing with a `*' and adds it to the queue for later"
@ 8,3 SAY "downloading or sequential viewing by use of the `D' and `V' keys"
@ 11,3 SAY "Searches for listings on user-selected criterion in the currently"
@ 12,3 SAY "selected area omly"
@ 15,3 SAY "Shows same view as shown by <Enter>, but allows sequential viewing of up"
@ 16,3 SAY "to 50 listings, with the option to add or remove the listing from the"
@ 17,3 SAY "download/viewing queue"
@ 19,25 SAY "───── Any Key to Continue ─────"
key = InKey(100)
DO cls WITH 2,0,20,79
SET COLOR TO GR+/N
@ 3,3 SAY "D"
@ 8,3 SAY "?"
@ 11,3 SAY "<Esc>"
SET COLOR TO BG/N
@ 3,5 SAY "Download pictures of highlited listing"
@ 8,5 SAY "Help"
@ 11,9 SAY "Area Screen"
SET COLOR TO W+/N
@ 4,3 SAY "Downloads up to four pictures of the highlited listing to your computer."
@ 5,3 SAY "These may include an exterior view, an interior view, a floor plan, and"
@ 6,3 SAY "a map of the property."
@ 9,3 SAY "Displays this file."
@ 12,3 SAY "Returns to previous screen, the area list."
@ 14,25 SAY "───── Any Key to Continue ─────"
key = InKey(100)
SEEK larea
DO WHILE pic1 # ptemp
SKIP
ENDDO
DO reset
RELEASE temp,ptemp
LOOP
CASE LastKey() = 68 .OR. LastKey() = 100 && D or d: Download
temp = crow
ptemp = pic1
fl = 0
IF pic
fl = 1
ENDIF
IF map
fl = fl + 1
ENDIF
IF pln
fl = fl + 1
ENDIF
IF int
fl = fl + 1
ENDIF
f1 = homes + pic1 + "PIC.GIF"
f2 = homes + pic1 + "MAP.GIF"
f3 = homes + pic1 + "PLN.GIF"
f2 = homes + pic1 + "INT.GIF"
DO BoxB WITH 7,18,10,50
@ 8,20 SAY "Pictures to be downloaded: " + Ltrim(Str(fl))
@ 9,20 SAY "Download now?"
SET COLOR TO N/N
@ 2,0 GET charin
DO WHILE .T.
READ
DO CASE
CASE LastKey() = 89 .OR. LastKey() = 121 && `Y' or `y'
SET COLOR TO W+/N
DO cls WITH 2,0,20,79
IF File(f1)
DOTBBS TYPE 34 OPTDATA "C:\HOMEBASE\PICS /I:" + Chr(34) + f1 + Chr(34)
ENDIF
IF File(f2)
DOTBBS TYPE 34 OPTDATA "C:\HOMEBASE\PICS /I:" + Chr(34) + f2 + Chr(34)
ENDIF
IF File(f3)
DOTBBS TYPE 34 OPTDATA "C:\HOMEBASE\PICS /I:" + Chr(34) + f3 + Chr(34)
ENDIF
IF File(f4)
DOTBBS TYPE 34 OPTDATA "C:\HOMEBASE\PICS /I:" + Chr(34) + f4 + Chr(34)
ENDIF
RELEASE f1,f2,f3,f4
EXIT
CASE LastKey() = 78 .OR. LastKey() = 110 && 'N' or 'n'
EXIT
OTHERWISE
LOOP
ENDCASE
ENDDO
SEEK larea
DO WHILE pic1 # ptemp
SKIP
ENDDO
DO reset
RELEASE temp,ptemp
LOOP
CASE LastKey() = 86 .OR. LastKey() = 118 && V or v: View Tagged
temp = crow
ptemp = pic1
IF tarray[1] # "EMPTY"
DO lview
SET COLOR TO R/R
@ 0,0 CLEAR TO 1,60
SET COLOR TO GR+/R
@ 0,3 SAY city
@ 0,Col()+1 SAY "Real Estate Listings in Area"
@ 0,Col()+1 SAY larea
SET COLOR TO W+/R
@ 0,73 SAY "LIST "
ELSE
DO cls WITH 2,0,20,79
DO BoxB WITH 5,16,10,62
@ 6,18 SAY "No listings have been tagged for download."
@ 8,18 SAY "To tag listings, Select 'T' in List Screen,"
@ 9,18 SAY "or use Search to find desired listings."
Key =InKey(10)
ENDIF
SEEK larea
DO WHILE pic1 # ptemp
SKIP
ENDDO
DO reset
RELEASE temp,ptemp
LOOP
CASE LastKey() = 83 .OR. LastKey() = 115 && S or s: Search
temp = crow
ptemp = pic1
DO sscr
SET COLOR TO GR+/R
@ 0,3 SAY "Search in Area "+larea
DO search WITH 4
SELECT a
SET FORMAT TO fscr NOCLEAR
SET COLOR TO R/R
@ 0,0 CLEAR TO 1,60
SET COLOR TO GR+/R
@ 0,3 SAY city
@ 0,Col()+1 SAY "Real Estate Listings in Area"
@ 0,Col()+1 SAY larea
SET COLOR TO W+/R
@ 0,73 SAY "LIST "
SEEK larea
DO WHILE pic1 # ptemp
SKIP
ENDDO
DO reset
RELEASE temp,ptemp
LOOP
CASE LastKey() = 84 .OR. LastKey() = 116 && T or t: Tag
DO ltag
OTHERWISE
LOOP
ENDCASE
ENDDO
RETURN
PROCEDURE reset
DO cls WITH 2,0,20,79
DO tl
IF crec # 1
SKIP -(crec-1)
ENDIF
DO nlist WITH brow,more,brec
SKIP crec-brec
SET COLOR TO GR+/B
crow=temp
@ crow,9 SAY " $"
@ crow,11 SAY price PICTURE "@B 9,999,999"
RETURN
PROCEDURE nlist
PARAMETERS brow,more,brec
rec = 0
crow = 2
DO WHILE crow < 19
crow = crow + 1
rec = rec + 1
fnd=aScan(tarray,pic1)
IF fnd # 0
SET COLOR TO RB+/N
@ crow,1 SAY "*"
ENDIF
SET COLOR TO GR+/N
@ crow,3 SAY "["
@ crow,4 SAY pic1
@ crow,7 SAY "]"
SET COLOR TO W+/N
@ crow,9 SAY " $"
@ crow,11 SAY price PICTURE "@B 9,999,999"
SET COLOR TO G/N
@ crow,21 SAY RTrim(sub) + " - "
@ crow,Col()+1 SAY RTrim(design)+","
@ crow,Col()+1 SAY beds PICTURE "@Z 9"
@ crow,Col()+1 SAY "bed,"
@ crow,Col()+1 SAY baths PICTURE "@Z 9"
IF .NOT. IsInt(baths)
@ crow,Col()+1 SAY "1/2"
ENDIF
@ crow,Col()+1 SAY "bath"
SKIP
IF Eof() .OR. area # larea
more=.F.
EXIT
ENDIF
ENDDO
SKIP -1
brec = rec
brow = crow
SET COLOR TO GR+/B
RETURN